home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 9
/
Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO
/
050a
/
tse_mac1.zip
/
TIMEDATE.ZIP
/
TIMEDATE.S
< prev
Wrap
Text File
|
1993-04-16
|
3KB
|
109 lines
// TSE macros: time(), date(), timedate(), fulldate(), timezone()
// Friday - April 16, 1993 @18:17
// File: timedate.s, timedate.zip
// Editor: Tom Klein, TAKnet Information Service; Fort Wayne, IN
// With the initial ideas generated by:
// 02-14-93: Submitted by Mel Hulse
// 03-09-93: KAC - Rewritten, commented, and tested.
// 04-15-93: TAK - expanded from fulldate only to 5 functions of time/date
// Macros(5) that inserts the current date with the full name of the month.
// time() = 18:22, date() = 04/16/93, timedate() = 04/16/93 18:22
// fulldate() = Friday - April 16, 1993, timezone()=18:23 EST/CDT
//
// ASSUMPTIONS: The cursor should be in the file where you wish the function
// to begin. The current insert mode will be used. i.e. if
// currently in overwrite mode, the date will overwrite,
// otherwise the date will be inserted.
//
// PARAMETERS: none
//
// RETURNS: none
//
// GLOBAL VARS: none
//
// LOCAL VARS: mon, day, year, dow - month, day, year, and day of week
// month_name - local string to hold full month name
//
//
PUBLIC proc fulldate()
integer mon, day, year, dow
string month_name[9] = ''
string day_of_week[9]= ''
GetDate(mon, day, year, dow) // get current date
case mon
when 1 month_name = 'January'
when 2 month_name = 'February'
when 3 month_name = 'March'
when 4 month_name = 'April'
when 5 month_name = 'May'
when 6 month_name = 'June'
when 7 month_name = 'July'
when 8 month_name = 'August'
when 9 month_name = 'September'
when 10 month_name = 'October'
when 11 month_name = 'November'
when 12 month_name = 'December'
endcase
case dow
when 1 day_of_week = 'Sunday'
when 2 day_of_week = 'Monday'
when 3 day_of_week = 'Tuesday'
when 4 day_of_week = 'Wednesday'
when 5 day_of_week = 'Thursday'
when 6 day_of_week = 'Friday'
when 7 day_of_week = 'Saturday'
endcase
InsertText(Format(Day_of_Week,' - ',Month_name,' ',day,', ',year))
end // End of FullDate()
PUBLIC proc time()
string time [5]
time=GetTimeStr()
time=substr(time,1,5)
InsertText(time)
end // time()
PUBLIC proc timezone()
string timezone[20]
timezone=GetTimeStr()
timezone=(Format (substr(timezone,1,5),' EST/CDT'))
InsertText(timezone)
end // timezone()
PUBLIC proc date()
string date[10]
date=GetDateStr()
InsertText(date)
end // date()
PUBLIC proc timedate()
date()
InsertText(' ')
time()
end // timedate()
// File: timedate.s, timedate.zip Friday - April 16, 1993